package com.zhaungjie.base.utils.PropertiesCopyUtils;

/**
 * 可配置属性拷贝
 *
 * @author zhuangjie
 * @date 2023/11/29
 * 用法： PropertiesCopyOfConfigurableFor.config(c->c.ignoreProperties(AddressBook::getId())).objectToObject(addressBook,DeliveryInfo.class)
 */
public class PropertiesCopy {
    public static <S, T> PropertiesCopyConfigRoot<S, T> type(Class<S> sourceTarget, Class<T> targetType) {
        if (sourceTarget == null || targetType == null) {
            throw new IllegalArgumentException("PropertiesCopy属性拷贝工具::sourceTarget or targetType is null");
        }
        return new PropertiesCopyConfigRoot<>(sourceTarget, targetType);
    }
}


